<?php
class Model_DbTable_Contact extends Apps_Db_Table_Abstract {
	protected $_name = 'contact';

	const STATUS_ACTIVE 	= 1;
	const STATUS_INACTIVE 	= 0;
	const STATUS_DELETE 	= -1;

	public function getList() {
	    $q = $this->_db
            	    ->select()
            	    ->from('contact')
            	    ->where('contact.status != ?', self::STATUS_DELETE)
            	    ->order('contact.status DESC');
	    return $q;
	}

	public function getcontactyById($contactId) {
	    $q = $this->_db
            	    ->select()
            	    ->from('contact')
            	    ->where('contact.id = ?', $contactId);
	    return $q;
	}
}